package com.kakarote.admin.entity.BO;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: admin
 * @version: v1.0
 * @date:2023/5/23
 */

@Data
@ApiModel("金额单位设置")
public class MonetaryUnitBO {

    @ApiModelProperty(value = "模块label Crm 1 OA 2 JXC 3 HRM 4")
    private Integer label;

    @ApiModelProperty(value = "金额单位 0:元 1:万元 2:百万元 3:千万元 4:亿元")
    private Integer unit = 0;


    @JsonIgnore
    public String getLabelName() {
        switch (label) {
            case 1:
                return "crm";
            case 2:
                return "oa";
            case 3:
                return "jxc";
            case 4:
                return "hrm";
            default:
                return "";
        }
    }

    @JsonIgnore
    public String getUnitName() {
        switch (unit) {
            case 0:
                return "元";
            case 1:
                return "万元";
            case 2:
                return "百万元";
            case 3:
                return "千万元";
            case 4:
                return "亿元";
            default:
                return "";
        }
    }
}
